<template>
	<view class="content-baisc-layout">
		<view class="content-area u-padding-bottom-40">
			<image src="https://resource.lanbaozixun.com/uploads/images/20240909210708c44118317.png" class="area-image u-margin-bottom-20" mode="widthFix" />
			<a :href="downloadUrl" class="btn u-text-center white u-margin-top-40">
				下载安装
			</a>
		</view>
	</view>
</template>

<script>
	import {
		getAppConfig
	} from '@/api/app'
	import {
		mapGetters,
	} from "vuex";
	export default {
		data() {
			return {
				downloadUrl:''
			};
		},
		onLoad() {
			var _this = this;
			getAppConfig().then(res => {
				if(res.code == 1){
					_this.downloadUrl = res.data.line_android
				}
			})
			uni.$once('h5ShareSetFinished',function(w,o){
				o.shareTitle = 'App下载';
				o.shareDesc = 'App下载';
				w.share(o)
			})
		},
		onShareAppMessage() {
			const shareInfo = Cache.get("shareInfo");
			return {
				title: 'App下载',
				path: "pages/download/download?invite_code=" + this.inviteCode,
				imageUrl: shareInfo.mnp_share_image,
			};
		},
		onShareTimeline() {
			const shareInfo = Cache.get("shareInfo");
			return {
				title: 'App下载',
				path: "pages/download/download?invite_code=" + this.inviteCode,
				imageUrl: shareInfo.mnp_share_image,
			};
		},
		computed: {
			...mapGetters(["inviteCode"]),
		}
	}
</script>

<style lang="scss">
	page {
		background: #FFF;
		min-height: 100vh;
		
		&::before{
			left: 0;
			right: 0;
			z-index: 1;
			height: 30%;
			content: ' ';
			position: absolute;
			background-image: url(https://resource.lanbaozixun.com/uploads/images/20240617141440943244509.png);
			background-size: 100%;
			background-repeat: no-repeat;
		}
		
		&::after{
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			z-index: 0;
			content: ' ';
			position: absolute;
			background: linear-gradient(to bottom, rgba(176, 223, 255, 1) 35%, #FFF 40%) no-repeat;
		}
		
		.content-baisc-layout{
			position: relative;
			min-height: 100vh;
			display: flex;
			flex-direction: column;
			justify-content: center;
			
			
			
			
			.content-area{
				width: 90%;
				margin: 0 5%;
				position: relative;
				z-index: 1;
				border-radius: 30rpx;
				background: #F0F9FF;
				box-shadow: 0px 2px 4px  #78BBFF;
				
				.area-image{
					width: 90%;
					height: 80vh;
					margin: 0 5%;
				}
				
				.btn{
					width: 90%;
					margin: 0 5%;
					display: block;
					padding: 15rpx 0;
					border-radius: 100rpx;
					text-decoration: none;
					box-shadow: 0px 2px 0px  #68B9FC;
					background: linear-gradient(180deg, #6BB2FF 0%, #437EEA 100%);
				}
			}
		}
	}
</style>
